package com.seecen.cywbackend.mapper;

import com.seecen.cywbackend.pojo.Group;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Update;

/**
* @author lenovo
* @description 针对表【t_group(圈子表)】的数据库操作Mapper
* @createDate 2025-03-21 16:29:02
* @Entity com.seecen.cywbackend.pojo.Group
*/
public interface GroupMapper extends BaseMapper<Group> {
    //增加成员数
    @Update("update t_group set member_count = member_count + 1 where id = #{groupId}")
    void incrementMemberCount(Integer groupId);

    //减少成员数
    @Update("update t_group set member_count = member_count - 1 where id = #{groupId}")
    void decrementMemberCount(Integer groupId);
}




